package com.shared;

import java.io.Serializable;

public class TaskGrid implements Serializable {
    
    private String level;
    private String name;
    private String note;
    private String due;
    
    public String getLevel () { return this.level;}
    public String getName  () { return this.name; }
    public String getNote  () { return this.note; }
    public String getDue   () { return this.due;  }
    
    public TaskGrid () {} // for gwt serialisation
    
    public TaskGrid (String level, String name, String note, String due) {
        this.level = level;
        this.name  = name;
        this.note  = note;
        this.due   = due;
    }  
    
    public String toString () {
        String ret;
        
        ret = this.name;
        if (this.note != null) {
            ret += " (" + this.note + ")";
        }
        if (this.due != null) {
            ret += " - " + this.due;
        }
        return ret;
    }
}
